package cc.edge2.sns.models;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Text;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true")
public class Diary {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long diaryId;
    @Persistent
    private Long userId;
    @Persistent
    private String subject;
    @Persistent
    private String body;    
    @Persistent
    private Date publishedDate;
	public Long getDiaryId() {
		return diaryId;
	}
	public void setDiaryId(Long diaryId) {
		this.diaryId = diaryId;
	}
	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public String getBody() {
		return body;
	}
	public void setBody(String body) {
		this.body = body;
	}
	public Date getPublishedDate() {
		return publishedDate;
	}
	public void setPublishedDate(Date publishedDate) {
		this.publishedDate = publishedDate;
	}
	public Diary() {
		super();
	}
	public Diary(Long userId, String subject, String body, Date publishedDate) {
		super();
		this.userId = userId;
		this.subject = subject;
		this.body = body;
		this.publishedDate = publishedDate;
	}

    
    
}
